<template>
	<view class="app">
		<view class="app-1" style="background-image: url(https://gnzxwylz.xlygrcw.com/upload/GNZX/user/1.png);">
			<view class="">
				<image :src="user.headimgurl" mode="aspectFill"></image>
				<view class="">
					<view class="">
						<text v-text="user.nickname"></text>
						<text>{{user.frontType==0?'普通用户':user.frontType==1?'委员':'需授权'}}</text>
					</view>
					<text>{{user.job||'暂无职位'}}</text>
				</view>
			</view>
			<view class="" @tap.stop="onUpda" style="background-image: url(https://gnzxwylz.xlygrcw.com/upload/GNZX/user/2.png);">
				<view class="">
					<text>当前得分：{{user.score}}</text>
					<text>不积跬步，无以至千里</text>
				</view>
				<text class="iconfont">&#xe60d;</text>
			</view>
		</view>
		<view class="app-2">
			<navigator hover-class="none" url="../../reviseInfo/reviseInfo">
				<view class="">
					<image src="https://gnzxwylz.xlygrcw.com/upload/GNZX/user/3.png" mode="widthFix"></image>
					<text>个人信息</text>
				</view>
				<view class="">
					<text></text>
					<text class="iconfont">&#xe60d;</text>
				</view>
			</navigator>
		</view>
		<view class="app-3">
			<navigator url="../../wodetian/wodetian" hover-class="none" v-if="user.frontType==1">
				<view class="">
					<image src="https://gnzxwylz.xlygrcw.com/upload/GNZX/user/4.png" mode="widthFix"></image>
					<text>我的提案</text>
				</view>
				<view class="">
					<text></text>
					<text class="iconfont">&#xe60d;</text>
				</view>
			</navigator>
			<navigator  url="/pages/wodeminyi/wodeminyi" hover-class="none">
				<view class="">
					<image src="https://gnzxwylz.xlygrcw.com/upload/GNZX/user/5.png" mode="widthFix"></image>
					<text>社情民意</text>
				</view>
				<view class="">
					<text></text>
					<text class="iconfont">&#xe60d;</text>
				</view>
			</navigator>
			<navigator  url="/pages/wodehuiyi/wodehuiyi" hover-class="none" v-if="user.frontType==1">
				<view class="">
					<image src="https://gnzxwylz.xlygrcw.com/upload/GNZX/user/6.png" mode="widthFix"></image>
					<text>我的会议</text>
				</view>
				<view class="">
					<text></text>
					<text class="iconfont">&#xe60d;</text>
				</view>
			</navigator>
			<navigator url="/pages/wodehuodong/wodehuodong" hover-class="none" v-if="user.frontType==1">
				<view class="">
					<image src="https://gnzxwylz.xlygrcw.com/upload/GNZX/user/7.png" mode="widthFix"></image>
					<text>我的活动</text>
				</view>
				<view class="">
					<text></text>
					<text class="iconfont">&#xe60d;</text>
				</view>
			</navigator>
			<navigator  url="/pages/wodewengao/wodewengao" hover-class="none" v-if="user.frontType==1">
				<view class="">
					<image src="https://gnzxwylz.xlygrcw.com/upload/GNZX/user/8.png" mode="widthFix"></image>
					<text>我的文稿</text>
				</view>
				<view class="">
					<text></text>
					<text class="iconfont">&#xe60d;</text>
				</view>
			</navigator>
			<!-- <navigator url="" >
				<view class="">
					<image src="https://gnzxwylz.xlygrcw.com/upload/GNZX/user/9.png" mode="widthFix"></image>
					<text>退出登录</text>
				</view>
				<view class="">
					<text></text>
					<text class="iconfont">&#xe60d;</text>
				</view>
			</navigator> -->
		</view> 
	</view>
</template>

<script>
	import validate from '../../../utils/validate.js';
export default {
	data() {
		return {
			user:{}
		};
	},
	components: {
	},
	onShow() {
		const loginState = validate.isEmptyVal(uni.getStorageSync('gnzx_users'));
		if (loginState) {
			uni.navigateTo({
				url: '../../login/login'
			});
		}
		this.user = uni.getStorageSync('gnzx_users')
	},

	methods: {
	onUpda() {
		uni.showToast({
			title: '功能维护中，敬请期待......',
			icon: 'none'
		});
	},
	}
};
</script>

<style lang="scss">
@import './index.scss';
</style>
